import { sessionStorage } from 'src/assets/js/storage';

const mutations = {
	SET_USER(state, user) {
		state.user = user;
		sessionStorage.setItem('user', user);
	},
	SET_TOKEN(state, token) {
		state.token = token;
		sessionStorage.setItem('token', token);
	},
	//登陆人员信息
	SET_USERINFOMSG(state, token) {
	    state.userInfoMsg = token;
	    sessionStorage.setItem('userInfoMsg', token);
	},
	GET_USERINFOMSG(state) {
		//console.log("测试GET_USERINFOMSG:", state.userInfoMsg)
	    state.userInfoMsg=sessionStorage.getItem('userInfoMsg');
	    return state.userInfoMsg
	},
	SET_TABLE(state, token) {
		//指派部门
		state.tableData = token;
		sessionStorage.setItem('tableData', token);
	},
	GET_TABLE(state) {
		console.log("state:", state.tableData)
		state.tableData = sessionStorage.getItem('tableData');
		return state.tableData;
	},
	REMOVE_TABLE(state) {
		sessionStorage.removeItem('tableData');
	},
	SET_ASSIGN(state, token) {
		state.assign = token;
		sessionStorage.setItem('assign', token);
	},
	GET_ASSIGN(state) {
		console.log("assign:", state.assign)
		state.assign = sessionStorage.getItem('assign');
		return state.assign;
	},
	SET_COMPANY(state, token) {
		state.company = token;
		sessionStorage.setItem('company', token);
	},
	GET_COMPANY(state) {
		console.log("company:", state.company)
		state.company = sessionStorage.getItem('company');
		return state.company;
	},
	SET_EMPLOYEE(state, token) { //token 就是传过来的s
		state.employee = token;
		sessionStorage.setItem('employee', token);
	},
	GET_EMPLOYEE(state) {
		state.employee = sessionStorage.getItem('employee');
		return state.employee;
	},
	SET_QIYE_EMPLOYEE(state, token) { //token 就是传过来的s
		// 企业必修课数据
		state.qiyeEmployee = token;
		sessionStorage.setItem('qiyeEmployee', token);
	},
	GET_QIYE_EMPLOYEE(state) {
		state.qiyeEmployee = sessionStorage.getItem('qiyeEmployee');
		return state.qiyeEmployee;
	},
	SET_KClIST_EMPLOYEE(state, token) { //token 就是传过来的s
		// 员工课程列表
		state.kcListEmployee = token;
		sessionStorage.setItem('kcListEmployee', token);
	},
	GET_KClIST_EMPLOYEE(state) {
		state.kcListEmployee = sessionStorage.getItem('kcListEmployee');
		return state.kcListEmployee;
	},
	SET_BIXIU_EMPLOYEE(state, token) { //token 就是传过来的s
		// 员工必修课列表
		state.bixiuEmployee = token;
		sessionStorage.setItem('bixiuEmployee', token);
	},
	GET_BIXIU_EMPLOYEE(state) {
		state.bixiuEmployee = sessionStorage.getItem('bixiuEmployee');
		return state.bixiuEmployee;
	},
	SET_TEA_KCLIST(state, token) { //token 就是传过来的s
		// 讲师课程列表
		state.teaKcList = token;
		sessionStorage.setItem('teaKcList', token);
	},
	GET_TEA_KCLIST(state) {
		state.teaKcList = sessionStorage.getItem('teaKcList');
		return state.teaKcList;
	},
	SET_ADD_USER(state, token) { //token 就是传过来的s
		// 用企业管理-员工列表携带的企业
		state.addUserG = token;
		sessionStorage.setItem('addUserG', token);
	},
	GET_ADD_USER(state) {
		state.addUserG = sessionStorage.getItem('addUserG');
		return state.addUserG;
	},
	SET_ADD_NEWCOMMENT(state, token) { //token 就是传过来的s
		// 新闻资讯-评论列表
		state.addNewComment = token;
		sessionStorage.setItem('addNewComment', token);
	},
	GET_ADD_NEWCOMMENT(state) {
		state.addNewComment = sessionStorage.getItem('addNewComment');
		return state.addNewComment;
	},
	SET_MENUID(state, token) {
		// 菜单管理-按钮管理
		state.menuTransitionId = token;
		sessionStorage.setItem('menuTransitionId', token);
	},
	GET_MENUID(state) {
		state.menuTransitionId = sessionStorage.getItem('menuTransitionId');
		return state.menuTransitionId;
	},
	SET_comment(state, token) {
		// 课程列表--添加评论
		state.kcComment = token;
		sessionStorage.setItem('kcComment', token);
	},
	GET_comment(state) {
		state.kcComment = sessionStorage.getItem('kcComment');
		return state.kcComment;
	},
	SET_lectureSignIn(state, token) {
		// 活动讲座--报名管理
		state.lectureSign = token;
		sessionStorage.setItem('lectureSign', token);
	},
	GET_lectureSignIn(state) {
		state.lectureSign = sessionStorage.getItem('lectureSign');
		return state.lectureSign;
	},
	SET_LIVE_COLUMN(state, token) {
		// 直播目录
		state.liveColumn = token;
		sessionStorage.setItem('liveColumn', token);
	},
	GET_LIVE_COLUMN(state) {
		state.liveColumn = sessionStorage.getItem('liveColumn');
		return state.liveColumn;
	},
	SET_COURSEWARE(state, token) {
		state.courseware = token;
		sessionStorage.setItem('courseware', token);
	},
	GET_COURSEWARE(state) {
		state.courseware = sessionStorage.getItem('courseware');
		return state.courseware;
	},
	SET_courseComment(state, token) {
		// 直播目录
		state.courseComment = token;
		sessionStorage.setItem('courseComment', token);
	},
	GET_courseComment(state) {
		state.courseComment = sessionStorage.getItem('courseComment');
		return state.courseComment;
	},
	SET_courseSign(state, token) {
		// 直播目录
		state.courseSign = token;
		sessionStorage.setItem('courseSign', token);
	},
	GET_courseSign(state) {
		state.courseSign = sessionStorage.getItem('courseSign');
		return state.courseSign;
	},
	SET_homework(state, token) {
		state.homework = token;
		sessionStorage.setItem('homework', token);
	},
	GET_homework(state) {
		state.homework = sessionStorage.getItem('homework');
		return state.homework;
	},
	SET_homeworkStatus(state, token) {
		state.homeworkStatus = token;
		sessionStorage.setItem('homeworkStatus', token);
	},
	GET_homeworkStatus(state) {
		state.homeworkStatus = sessionStorage.getItem('homeworkStatus');
		return state.homeworkStatus;
	},
	SET_video(state, token) {
		state.video = token;
		sessionStorage.setItem('video', token);
	},
	GET_video(state) {
		state.video = sessionStorage.getItem('video');
		return state.video;
	},
	SET_file(state, token) {
		state.file = token;
		sessionStorage.setItem('file', token);
	},
	GET_file(state) {
		state.file = sessionStorage.getItem('file');
		return state.file;
	},
	SET_live(state, token) {
		
		state.live = token;
		sessionStorage.setItem('live', token);
	},
	GET_live(state) {
		// console.log("测试GET_USERINFOMSG:", state.live)
		state.live = sessionStorage.getItem('live');
		return state.live;
	},
	SET_USERLIVE(state, token) {
		state.userLiveState = token;
		sessionStorage.setItem('userLiveState', token);
	},
	GET_USERLIVE(state) {
		state.userLiveState = sessionStorage.getItem('userLiveState');
		return state.userLiveState;
	},
	SET_newLiveColumn(state, token) {
		console.log("测试sET:", state.newLiveColumn)
		state.newLiveColumn = token;
		sessionStorage.setItem('newLiveColumn', token);
	},
	GET_newLiveColumn(state) {
		// console.log("测试GET:", state.live)
		state.newLiveColumn = sessionStorage.getItem('newLiveColumn');
		return state.newLiveColumn;
	},
	SET_createTeacherWare(state, token) {
		state.createTeacherWare = token;
		sessionStorage.setItem('createTeacherWare', token);
	},
	GET_createTeacherWare(state) {
		state.createTeacherWare = sessionStorage.getItem('createTeacherWare');
		return state.createTeacherWare;
	},
	SET_LIVE_DATA(state, token) {
		state.livedata = token;
		sessionStorage.setItem('livedata', token);
	},
	GET_LIVE_DATA(state) {
		state.livedata = sessionStorage.getItem('livedata');
		return state.livedata;
	},
	SET_USERRECORDEDDATA(state, token) {
		state.recordedData = token;
		sessionStorage.setItem('recordedData', token);
	},
	GET_USERRECORDEDDATA(state) {
		state.recordedData = sessionStorage.getItem('recordedData');
		return state.recordedData;
	},
	SET_USERuserKnowledgeMap(state, token) {
		state.userKnowledgeMap = token;
		sessionStorage.setItem('userKnowledgeMap', token);
	},
	GET_USERuserKnowledgeMap(state) {
		state.userKnowledgeMap = sessionStorage.getItem('userKnowledgeMap');
		return state.userKnowledgeMap;
	},
	SET_USERuserHomework(state, token) {
		state.userHomework = token;
		sessionStorage.setItem('userHomework', token);
	},
	GET_USERuserHomework(state) {
		state.userHomework = sessionStorage.getItem('userHomework');
		return state.userHomework;
	},
	SET_LiveManager(state, token) {
		state.liveManager = token;
		sessionStorage.setItem('liveManager', token);
	},
	GET_LiveManager(state) {
		state.liveManager = sessionStorage.getItem('liveManager');
		return state.liveManager;
	},
	SET_teacherCourse(state, token) {
		state.teacherCourse = token;
		sessionStorage.setItem('teacherCourse', token);
	},
	GET_teacherCourse(state) {
		state.teacherCourse = sessionStorage.getItem('teacherCourse');
		return state.teacherCourse;
	},
	SET_dynamicContent(state, token) {
		state.dynamicContent = token;
		sessionStorage.setItem('dynamicContent', token);
	},
	GET_dynamicContent(state) {
		state.dynamicContent = sessionStorage.getItem('dynamicContent');
		return state.dynamicContent;
	},
	SET_topicContent(state, token) {
		state.topicContent = token;
		sessionStorage.setItem('topicContent', token);
	},
	GET_topicContent(state) {
		state.topicContent = sessionStorage.getItem('topicContent');
		return state.topicContent;
	},
	SET_topicCommentList(state, token) {
		state.topicCommentList = token;
		sessionStorage.setItem('topicCommentList', token);
	},
	GET_topicCommentList(state) {
		state.topicCommentList = sessionStorage.getItem('topicCommentList');
		return state.topicCommentList;
	},
	SET_topicCommentContent(state, token) {
		state.topicCommentContent = token;
		sessionStorage.setItem('topicCommentContent', token);
	},
	GET_topicCommentContent(state) {
		state.topicCommentContent = sessionStorage.getItem('topicCommentContent');
		return state.topicCommentContent;
	},
	SET_activityContent(state, token) {
		state.activityContent = token;
		sessionStorage.setItem('activityContent', token);
	},
	GET_activityContent(state) {
		state.activityContent = sessionStorage.getItem('activityContent');
		return state.activityContent;
	},
	SET_activitySign(state, token) {
		state.activitySign = token;
		sessionStorage.setItem('activitySign', token);
	},
	GET_activitySign(state) {
		state.activitySign = sessionStorage.getItem('activitySign');
		return state.activitySign;
	},
	SET_liveWinners(state, token) {
		state.liveWinners = token;
		sessionStorage.setItem('liveWinners', token);
	},
	GET_liveWinners(state) {
		state.liveWinners = sessionStorage.getItem('liveWinners');
		return state.liveWinners;
	},
	SET_liveDataType(state, token) {
		state.liveDataType = token;
		sessionStorage.setItem('liveDataType', token);
	},
	GET_liveDataType(state) {
		state.liveDataType = sessionStorage.getItem('liveDataType');
		return state.liveDataType;
	},
	SET_liveDataColumn(state, token) {
		state.liveDataColumn = token;
		sessionStorage.setItem('liveDataColumn', token);
	},
	GET_liveDataColumn(state) {
		state.liveDataColumn = sessionStorage.getItem('liveDataColumn');
		return state.liveDataColumn;
	},
	SET_courseWareSign(state, token) {
		state.courseWareSign = token;
		sessionStorage.setItem('courseWareSign', token);
	},
	GET_courseWareSign(state) {
		state.courseWareSign = sessionStorage.getItem('courseWareSign');
		return state.courseWareSign;
	},
	SET_coursewareLiveWrap(state, token) {
		state.coursewareLiveWrap = token;
		sessionStorage.setItem('coursewareLiveWrap', token);
	},
	GET_coursewareLiveWrap(state) {
		state.coursewareLiveWrap = sessionStorage.getItem('coursewareLiveWrap');
		return state.coursewareLiveWrap;
	},
	SET_userStudyData(state, token) {
		state.userStudyData = token;
		sessionStorage.setItem('userStudyData', token);
	},
	GET_userStudyData(state) {
		state.userStudyData = sessionStorage.getItem('userStudyData');
		return state.userStudyData;
	},
	SET_userLiveData(state, token) {
		state.userLiveData = token;
		sessionStorage.setItem('userLiveData', token);
	},
	GET_userLiveData(state) {
		state.userLiveData = sessionStorage.getItem('userLiveData');
		return state.userLiveData;
	}
};

export default mutations;